Unifying clones with a generative programming technique: a case study
نویسندگان
چکیده
Software clones – similar program structures repeated in variant forms – increase the risk of update anomalies, blow up the program size and complexity, possibly contributing to high maintenance costs. Yet, programs are often polluted by clones. In this paper, we present a case study of cloning in the Java Buffer library, JDK 1.5. We found that at least 68% of code in the Buffer library was contained in cloned classes or class methods. Close analysis of program situations that led to cloning revealed difficulties in eliminating clones with conventional program design techniques. As a possible solution, we applied a generative technique of XVCL to represent similar classes and methods in generic, adaptable form. Concrete buffer classes could be automatically produced from the generic structures. We argue, on analytical and empirical grounds, that unifying clones reduced conceptual complexity, and enhanced changeability of the Buffer library at rates proportional to code size reduction (68%). We evaluated our solution in qualitative and quantitative ways, and conducted a controlled experiment to support this claim. The approach presented in the paper can be used to enhance genericity and changeability of any program, independently of an application domain or programming language. As the solution is not without pitfalls, we discuss trade-offs involved in its project application.
منابع مشابه
A Mixed Integer Programming Approach to Optimal Feeder Routing for Tree-Based Distribution System: A Case Study
A genetic algorithm is proposed to optimize a tree-structured power distribution network considering optimal cable sizing. For minimizing the total cost of the network, a mixed-integer programming model is presented determining the optimal sizes of cables with minimized location-allocation cost. For designing the distribution lines in a power network, the primary factors must be considered as m...
متن کاملUnifying Software Similarity Patterns with a Meta-level Generative Technique: A Case Study and Evaluation
In a previous study, we analyzed similarity patterns in the Java Buffer library, JDK 1.5. We observed many similar classes, methods and yet smaller fragments elements of class design. We argued that, given the design goals, it was difficult to avoid those repetitions with conventional design techniques. We also argued that the reasons why the problem arises and its symptoms are common. In this ...
متن کاملFuzzy Goal Programming Model to Rolling Performance Based Budgeting by Productivity Approach (Case Study: Gas Refiner-ies in Iran)
This research presents a mathematical model for performance-based budgeting and combines it with rolling budget for increased flexibility. The model has been designed by Chebyshev's goal programming technique with fuzzy approach. The parameters or coefficients of the model are derived by measuring the productivity of the organizations considering eight criteria. Data for calc...
متن کاملA New Method For Solving Linear Bilevel Multi-Objective Multi-Follower Programming Problem
Linear bilevel programming is a decision making problem with a two-level decentralized organization. The leader is in the upper level and the follower, in the lower level. This study addresses linear bilevel multi-objective multi-follower programming (LB-MOMFP) problem, a special case of linear bilevel programming problems with one leader and multiple followers where each decision maker has sev...
متن کاملMethodology based on MCDM for risk management in EPC projects: A Case Study of LPG Storage Tanks Construction
The most important aim of every project is on time completion, budget consideration and reaching the highest possible quality, based on contract. This paper suggests a methodology for risk management in engineering, procurement, and construction (EPC) projects. Risk management enables project teams to perform with minimum deviation from predetermined goals. The proposed methodology identifies a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Software Maintenance
دوره 18 شماره
صفحات -
تاریخ انتشار 2006